CommandInsertTrafficSign Class Reference

#include <CommandInsertTrafficSign.h>

Inheritance diagram for CommandInsertTrafficSign:

Command List of all members.

Public Member Functions

 CommandInsertTrafficSign (osg::Vec3 pos, OSGWindows *osgwind, TrafficSignTypes newType)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
TrafficSign * sign
vector< TraffEduObject * > insertedObjs_

Detailed Description

Definition at line 8 of file CommandInsertTrafficSign.h.


Constructor & Destructor Documentation

CommandInsertTrafficSign::CommandInsertTrafficSign (  osg::Vec3  pos,
OSGWindows *  osgwind,
TrafficSignTypes  newType
) 
 

A constructor. Initializes osgwind_ and creates a new traffic sign object by using the given parameters.

Parameters:
pos a osg::Vec3 argument.
osgwind an OSGWindows pointer.
newType a TrafficSignTypes argument.

Definition at line 2 of file CommandInsertTrafficSign.cpp.

References OSGWindows::addObject(), TraffEduObject::getObjectGroup(), insertedObjs_, osgwind, osgwind_, TraffEduObject::setPosition(), TraffEduObject::setScale(), and sign.


Member Function Documentation

bool CommandInsertTrafficSign::execute (   )  [virtual]
 

do the insertion of traffic sign object operation.

Returns:
Operation success

Implements Command.

Definition at line 26 of file CommandInsertTrafficSign.cpp.

References OSGWindows::doAddGeode(), osgwind_, and sign.

bool CommandInsertTrafficSign::unexecute (   )  [virtual]
 

undo the insertion of traffic sign object operation.

Returns:
Operation success

Implements Command.

Definition at line 17 of file CommandInsertTrafficSign.cpp.

References OSGWindows::doDeleteGeode(), osgwind_, and sign.


Member Data Documentation

vector<TraffEduObject*> CommandInsertTrafficSign::insertedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the inserted traffic sign objects.

Definition at line 28 of file CommandInsertTrafficSign.h.

Referenced by CommandInsertTrafficSign().

OSGWindows* CommandInsertTrafficSign::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 16 of file CommandInsertTrafficSign.h.

Referenced by CommandInsertTrafficSign(), execute(), and unexecute().

TrafficSign* CommandInsertTrafficSign::sign [private]
 

a private variable. It is used to hold the created traffic sign object.

Definition at line 22 of file CommandInsertTrafficSign.h.

Referenced by CommandInsertTrafficSign(), execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO